home *** CD-ROM | disk | FTP | other *** search
- // save all open documents as flash documents
-
- //$.bp(); // Uncomment this line to cause the script to be run in the JavaScript debugger window.
-
- numDocuments = documents.length;
-
- for ( i = 0 ; i < numDocuments; i++)
- {
- aDocument = documents[i];
- theDocumentName = aDocument.name;
-
- flashOptions = new ExportOptionsFlash();
-
- flashOptions.jpegQuality = 10;
- flashOptions.curveQuality = 10;
- flashOptions.replacing = SaveOptions.SAVECHANGES;
-
- docPath = aDocument.path;
- docPathStr = docPath.toString();
-
- if (docPathStr.length > 1)
- {
- documentPath = docPath + "/" + aDocument.name;
- }
- else
- {
- // This is a brand new file and doesn't have a path yet,
- // so put it in the illustrator application folder.
- documentPath = path + "/" + aDocument.name;
- }
-
- theFile = new File(documentPath);
- aDocument.exportFile(theFile, ExportType.FLASH, flashOptions);
- }
-